//
//  CallStarHomeCell.m
//  LiveStar
//
//  Created by 漪珊 on 2017/5/2.
//  Copyright © 2017年 apple. All rights reserved.
//

#import "CallStarHomeCell.h"
#import "CallStarModel.h"

@implementation CallStarHomeCell
- (void)awakeFromNib {
    [super awakeFromNib];
    kButtonRadius(self.supportBtn, 5);
    UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(leaveWordListAction:)];
    UITapGestureRecognizer *tap1 = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(leaveWordListAction:)];
    [self.leavwordNumLabel addGestureRecognizer:tap];
    [self.leavewordTitleLabel addGestureRecognizer:tap1];
}
- (void)setCallStarModel:(CallStarModel *)callStarModel {
    _callStarModel = callStarModel;
    self.starnameLabel.text = callStarModel.s_name;
    self.totalSupportLabel.text = KString(callStarModel.s_number);
    self.leavwordNumLabel.text = KString(callStarModel.s_comment);
}

#pragma mark -- 呼唤明星
- (IBAction)callStarAction:(id)sender {
    if (self.callStar) {
        self.callStar();
    }
}

//产看呼唤明星留言
- (void)leaveWordListAction:(UITapGestureRecognizer *)tap {
    if ([self.delegate respondsToSelector:@selector(callStarLeavewordListWithCell:)]) {
        [self.delegate callStarLeavewordListWithCell:self];
    }
}

@end
